package indi.zhifa.engine.test2.controller;

import indi.zhifa.core.common.web.entity.ann.ZhiFaRestController;
import indi.zhifa.core.common.web.entity.response.RestResponse;

import indi.zhifa.engine.test2.busylogic.crudtest.entity.TestEntityDto;
import indi.zhifa.engine.test2.busylogic.crudtest.service.ITestCurdService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

@Slf4j
@Validated
@RequiredArgsConstructor
@RequestMapping(value = "/api/zhifa-engine/test/crud")
@ZhiFaRestController
@Tag(name = "CRUD测试接口")
public class CrudController {

    private final ITestCurdService mTestCurdService;

    @PostMapping("/mpEnhance/testEntity")
    public RestResponse<String> mpSave(@RequestBody TestEntityDto pTestDto){
        mTestCurdService.mpSave(pTestDto);
        return RestResponse.ok("插入成功") ;
    }

}
